package cn.hlife.com.hlfhaemocyte.utils;

/**
 * Created by Administrator on 2017/6/14.
 */

public class ConstantUtils {

    /**
     * 开始测量指令
     * @return
     */
    public  static   byte [] sendStartCommand(){
        byte[] sendCommand = new byte[6];
        sendCommand[0] = (byte)0xaa;
        sendCommand[1] = (byte)0x03;
        sendCommand[2] = (byte)0x09;
        sendCommand[3] = (byte)0x01;
        sendCommand[4] = (byte)0x01;
        return  sendCommand;
    }
    /**
     *白细胞阈值：指令集
     * @param c1
     * @param c2
     * @return
     */
    public static  byte[]  getCommandArrayByWBC(int c1,int  c2) {
        byte[] sendCommand = new byte[6];
        sendCommand[0] = (byte)0xaa;
        sendCommand[1] = (byte)0x04;
        sendCommand[2] = (byte)0x0c;
        sendCommand[3] = (byte)0x02;
        sendCommand[4] = (byte)c1;
        sendCommand[5] = (byte)c2;
        return  sendCommand;
    }

    /**
     *红细胞阈值：指令集
     * @param c1
     * @param c2
     * @return
     */
    public static  byte[]  getCommandArrayByRBC(int c1,int  c2) {
        byte[] sendCommand = new byte[6];
        sendCommand[0] = (byte)0xaa;
        sendCommand[1] = (byte)0x04;
        sendCommand[2] = (byte)0x0c;
        sendCommand[3] = (byte)0x01;
        sendCommand[4] = (byte)c1;
        sendCommand[5] = (byte)c2;
        return  sendCommand;
    }

    /**
     * 血小板阈值：指令集
     * @param c1
     * @param c2
     * @return
     */
    public static byte[]  getCommandArrayByPLT(int c1,int  c2) {
        byte[] sendCommand = new byte[6];
        sendCommand[0] = (byte)0xaa;
        sendCommand[1] = (byte)0x04;
        sendCommand[2] = (byte)0x0c;
        sendCommand[3] = (byte)0x03;
        sendCommand[4] = (byte)c1;
        sendCommand[5] = (byte)c2;
        return  sendCommand;
    }

}
